' maxedit.bmx

' see history.txt for latest changes
' see license.txt for 

Rem

MaxEdit Project Editor

Copyright (c) 2006,2008 Simon Armstrong

Permission is hereby granted, free of charge, to any person 
obtaining a copy of this software and associated documentation 
files (the "Software"), to deal in the Software without 
restriction, including without limitation the rights to use, 
copy, modify, merge, publish, distribute, sublicense, and/or 
sell copies of the Software, and to permit persons to whom the 
Software is furnished to do so, subject to the following 
conditions:

The above copyright notice and this permission notice shall 
be included in all copies or substantial portions of the 
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

EndRem

Strict

Framework maxgui.drivers

Import brl.standardio
Import brl.retro
Import brl.filesystem
Import brl.system
Import pub.freeprocess
Import brl.pngloader
Import brl.timer
Import brl.maxutil

Import brl.GLMax2D
Import brl.bmploader
Import brl.pngloader

?win32
Import "maxeditresource.o"
?

Import "maxtk/maxtk.bmx"

Import "plugins/blitzmaxplugin.bmx"

Import "plugins/historyplugin.bmx"
Import "plugins/searchplugin.bmx"

Import "plugins/binplugin.bmx"

Import "plugins/cplugin.bmx"
Import "plugins/cppplugin.bmx"
Import "plugins/glslplugin.bmx"

Import "plugins/assemblerplugin.bmx"
Import "plugins/blitzbasicplugin.bmx"
Import "plugins/textplugin.bmx"
Import "plugins/htmlplugin.bmx"
Import "plugins/jsplugin.bmx"
Import "plugins/javaplugin.bmx"
Import "plugins/pythonplugin.bmx"
Import "plugins/jsplugin.bmx"


Import "plugins/imageplugin.bmx"
Import "plugins/xmlplugin.bmx"

'Import "plugins/svnplugin.bmx"
'Import "plugins/inlinerplugin.bmx"

Import "plugins/m3dplugin.bmx"
Import "plugins/fileb3d.bmx"

?win32
'Import "plugins/blitz3dsdkplugin.bmx"
?

Incbin "toolbar.png"

'maxgui_driver=New TWindowsGUIDriver

Global maxedit:TMaxEdit

New TMaxEdit.Create("MaxEdit","MaxEdit v0.39").Run

Type TMaxEdit Extends TEditor

	Method Create:TMaxEdit(name$,about$)
' tool plugins
		Register New TSearchPlugin
		Register New THistoryPlugin
' language plugins
		Register New TBlitzMaxPlugin
		Register New TAssemblerPlugin
		Register New TBlitzBasicPlugin

		Register New TCPlugin
		Register New TCPPPlugin
		Register New TGLSLPlugin
		Register New TTextPlugin
		Register New THTMLPlugin

		Register New TPythonPlugin
		Register New TJSPlugin		

		Register New TJavaPlugin
		Register New TEntityPlugin

		Register New TImagePlugin
		Register New TBinPlugin
		Register New TXMLPlugin
'		Register New TSVNPlugin
?win32
'		Register New TBlitz3DSDKPlugin
?
		ResetEditor(name,about)		
		Return Self
	End Method

' currently dependent on blitzmaxplugin

	Method FullPath$(path$)
'		DebugLog "FullPath:path="+path
		If path[..7]="file://" path=path[7..]
		If path[..8]="$BMXPATH" path=bmxpath+path[8..]
		path=RealPath(path)
?win32
		path=path.Replace("\","/")
?
		Return path
	End Method

	Method IsTempPath(path$)
		If path[..Len bmxpath+5]=bmxpath+"/tmp/" Return True
	End Method
End Type
